package com.gxr.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.dao.ObjectDao;
import com.pro.bean.Unit;

public class AddUserServlet extends HttpServlet {

	/**
	 * ���ڵ������û���ť�� ��ȡ��ݿ��й�˾������Ϣ ����˾������Ϣ����list ��Я����Ϣ��ת����admin_super_add.jsp��
	 */
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doPost(request,response);
	}


	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		/*response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		out.flush();
		out.close();*/
		Unit unit =new Unit();
		ObjectDao ObjectDao=new ObjectDao();
		List lUnit=ObjectDao.findall(unit);
		HttpSession sessionUnit=request.getSession();
		sessionUnit.setAttribute("list", lUnit);
		
		response.sendRedirect("../gxr/admin_super_user_add.jsp");
	}

	

}
